/**
 * 
 * @param {*} arr 满足可迭代协议
 * @returns 
 */
let test = new Map([
    ['a',1],
    ['b',2]
])
let testArr = [['a',1]]
Object.myFromEntries = function(arr){
    let obj ={}
    for(let item of arr){
        console.log();
        obj[item[0]]=item[1]
    }
    return obj
}

console.log(Object.myFromEntries(test));